<?php
/**
 * Created by PhpStorm.
 * User: 徐嘉宾
 * Date: 2016/8/10
 * Time: 15:43
 */
$this->registerCssFile('@web/css/backstage.css',['depends'=>['app\assets\AppAsset']]);
$this->registerJsFile('@web/js/addoption.js',['depends'=>['app\assets\AppAsset']]);
$this->registerJsFile('@web/js/tablequestion.js',['depends'=>['app\assets\AppAsset']]);
use yii\helpers\Url;
use yii\widgets\LinkPager;
// var_dump($readinfo);die;
?>
<div class="main">
    <!--右侧内容-->
    <div class="cont">
        <div class="title">题目概况</div>
        <div class="details">
            <div class="details_operation clearfix">
                <div class="bui_select">
                    <input type="button" value="添&nbsp;&nbsp;加" class="add" onclick="location.href = './?r=admin/readadd';">
                </div>
                <div class="fr">
                    <div class="text">
                        <span>日期：</span>
                        <div class="bui_select">
                            <select name="" id="" class="select">
                                <option value="1"><?= date("Y-m-d "); ?></option>
                            </select>
                        </div>
                    </div>
                    <div class="text">
                        <span></span>
                        <div class="bui_select">
                            <select name="" id="" class="select">
                                <option value="1">Let bygones be bygones.</option>
                            </select>
                        </div>
                    </div>
                    <div class="text">
                        <span></span>
<!--                        <input type="text" value="" class="search">-->
                    </div>
                </div>
            </div>
            <form action="./?r=admin/readquestion&id=<?= $id ?>" method="post">
            <table class="table" cellspacing="0" cellpadding="0">
                <thead>
                <tr>
                    <th width="15%">属性</th>
                    <th>内容</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>题号</td>
                    <td><input type="text" name="tnum" placeholder="题号"></td>
                </tr>
                <tr>
                    <td>内容</td>
                    <td><input type="text" name="content" placeholder="内容"></td>
                </tr>
                    <tr>
                        <td>题目对应段落</td>
                        <td><input type="text" name="paragraph" placeholder="段落数"></td>
                    </tr>
                <tr>
                    <td>题目对应模板</td>
                    <td>
                        <select name="type" id="">
                            <option value="1">普通选择题、句子插入题（A-D）</option>
                            <option value="3">表格题（A-G）</option>
                            <option value="4">多选题六选三（A-F）</option>
                        </select>
                    </td>
                </tr>
                    <tr>
                        <td>题目类型</td>
                        <td>
                            <select name="t_type" id="t_type">
                                <option value="1">事实信息题</option>
                                <option value="2">否定事实信息题</option>
                                <option value="3">判断题</option>
                                <option value="4">修辞目的题</option>
                                <option value="5">词汇题</option>
                                <option value="6">指代题</option>
                                <option value="7">句子简化题</option>
                                <option value="8">文本插入题</option>
                                <option value="9">文章小结题</option>
                                <option value="10">表格题</option>
                            </select>
                            </select>
                        </td>
                    </tr>
                <div id="optionbox">
                <tr>
                    <td>选项: A</td>
                    <td>
                        选项内容：<input type="text" name="1" placeholder="选项内容"><br>
                        是否正确：<input type="checkbox" name="1_correct" value="1">
                    </td>
                </tr>
                <tr>
                    <td>选项: B</td>
                    <td>
                        选项内容：<input type="text" name="2" placeholder="选项内容"><br>
                        是否正确：<input type="checkbox" name="2_correct" value="1">
                    </td>
                </tr>
                <tr>
                    <td>选项:C</td>
                    <td>
                        选项内容：<input type="text" name="3" placeholder="选项内容"><br>
                        是否正确：<input type="checkbox" name="3_correct" value="1">
                    </td>
                </tr>
                <tr>
                    <td>选项: D</td>
                    <td>
                        选项内容：<input type="text" name="4" placeholder="选项内容"><br>
                        是否正确：<input type="checkbox" name="4_correct" value="1">
                    </td>
                </tr>
                </div>
                    <tr>
                        <input name="_csrf" type="hidden" id="_csrf" value="<?= Yii::$app->request->csrfToken ?>">
                        <td colspan="2" style="text-align: center">
                            <a class="btn" id="addoption">添加选项</a>
                            <input type="submit" class="btn">
                            <input class="btn" type="reset">
                        </td>
                    </tr>
                </tbody>
            </table>
            </form>
        </div>
    </div>
</div>